package com.tianma315.admin.invocie.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.tianma315.admin.common.base.CoreServiceImpl;
import com.tianma315.admin.supplier.domain.SupplierDO;
import org.springframework.stereotype.Service;

import com.tianma315.admin.invocie.dao.LogisticsCompanyDao;
import com.tianma315.admin.invocie.domain.LogisticsCompanyDO;
import com.tianma315.admin.invocie.service.LogisticsCompanyService;

import java.util.List;


/**
 * 
 * <pre>
 * 物流公司表
 * </pre>
 * <small> 2019-12-17 15:02:38 | Aron</small>
 */
@Service
public class LogisticsCompanyServiceImpl extends CoreServiceImpl<LogisticsCompanyDao, LogisticsCompanyDO> implements LogisticsCompanyService {

    @Override
    public boolean deleteLogComById(Long id) {
        LogisticsCompanyDO logCom = new LogisticsCompanyDO();
        logCom.setId(id);
        logCom.setState(1);
        boolean flag = updateById(logCom);
        return flag;
    }

    @Override
    public List<LogisticsCompanyDO> getAll() {
        EntityWrapper<LogisticsCompanyDO> wrapper = new EntityWrapper<>();
        wrapper.eq("state",0);
        List<LogisticsCompanyDO> logisticsCompanyDOS =  selectList(wrapper);
        return logisticsCompanyDOS;
    }
}
